﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace ChoMy.Models.Data
{
    public class PropertyType
    {
        [Key]
        public int Id { get; set; }
        public string NameId { get; set; }

        public string Name { get; set; }
        public string Description { get; set; }
        public string NameVn { get; set; }

        public bool IsDelete { get; set; }
        public DateTime DateCreated { get; set; }
        public DateTime? DateModified { get; set; }
        public string CreatedBy { get; set; }
        public string ModifiedBy { get; set; }

        public virtual List<Property> Properties { get; set; }
        public virtual List<CategoryPropertyType> CategoryPropertyTypes { get; set; }

        public PropertyType()
        {
            IsDelete = false;
            DateCreated = DateTime.Now;
            CreatedBy = HttpContext.Current.User.Identity.Name;
        }
    }
}